  % Matrix for the quasi-linear system of U-Alpha
  for i=1:N
    Aarray(:,:,i)=[2*U0.internal(i)-(alphag.internal(i)*(rhog-rhol)*U0.internal(i))/rhom0.internal(i),...
    ((rhog-rhol)*U0.internal(i)^2)/rhom0.internal(i)-((rhog-rhol)*U0.internal(i)*...
    (alphag.internal(i)*(-(2*(1-alphag.internal(i))*rhol*V0)/((1-alphag.internal(i))*...
    rhol+alphag.internal(i)*rhog)-((1-alphag.internal(i))^2*(rhog-rhol)*rhol*V0)/...
    ((1-alphag.internal(i))*rhol+alphag.internal(i)*rhog)^2)+((1-alphag.internal(i))^2*rhol*V0)/...
    ((1-alphag.internal(i))*rhol+alphag.internal(i)*rhog)+U0.internal(i)))/rhom0.internal(i);
    alphag.internal(i),alphag.internal(i)*(-(2*(1-alphag.internal(i))*rhol*V0)/...
    ((1-alphag.internal(i))*rhol+alphag.internal(i)*rhog)-((1-alphag.internal(i))^2*...
    (rhog-rhol)*rhol*V0)/((1-alphag.internal(i))*rhol+alphag.internal(i)*rhog)^2)+...
    ((1-alphag.internal(i))^2*rhol*V0)/((1-alphag.internal(i))*rhol+alphag.internal(i)*rhog)+U0.internal(i)];
  end